package com.adong.crowd.mapper;


import java.util.List;

import com.adong.crowd.entity.po.ProjectPO;
import com.adong.crowd.entity.po.ProjectPOExample;
import com.adong.crowd.entity.vo.DetailProjectVO;
import com.adong.crowd.entity.vo.PortalTypeVO;
import org.apache.ibatis.annotations.Param;


public interface ProjectPOMapper {
    long countByExample(ProjectPOExample example);

    int deleteByExample(ProjectPOExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ProjectPO record);

    int insertSelective(ProjectPO record);

    List<ProjectPO> selectByExample(ProjectPOExample example);

    ProjectPO selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ProjectPO record, @Param("example") ProjectPOExample example);

    int updateByExample(@Param("record") ProjectPO record, @Param("example") ProjectPOExample example);

    int updateByPrimaryKeySelective(ProjectPO record);

    int updateByPrimaryKey(ProjectPO record);

    /**
     * 插入分类和项目的关系
     *
     * @param typeIdList
     * @param projectId
     */
    void insertTypeRelationship(
            @Param("typeIdList") List<Integer> typeIdList,
            @Param("projectId") Integer projectId);

    /**
     * 插入项目和标签关系
     *
     * @param tagIdList
     * @param projectId
     */
    void insertTagRelationship(
            @Param("tagIdList") List<Integer> tagIdList,
            @Param("projectId") Integer projectId);

    /**
     * 查看portal首页的全部信息
     */
    List<PortalTypeVO> selectPortalTypeVOList();



    /**
     * 查看每个众筹项目里面的详情
     */

    DetailProjectVO selectDetailProjectVO(Integer projectId);




}